home *** CD-ROM | disk | FTP | other *** search
/ SGI Enlighten DSM 1.1 / SGI EnlightenDSM 1.1.iso / hp10x / common.z / common / config / remlp.plate < prev    next >
Text File  |  1998-06-30  |  1KB  |  96 lines

  1. #!/bin/sh
  2. # lp interface for cross platform printing
  3. #
  4. #    SID    @(#)remlp.plate.D    1.2    95/10/16
  5. # Copyright (c) 1990-1998 Enlighten Software Solutions, Inc.
  6. #
  7.  
  8.  
  9. SPOOLER=att
  10. ENLIGHTEN=
  11. HOST=
  12. REMPR=
  13.  
  14. ret=0
  15. PATH=$PATH:$ENLIGHTEN/bin
  16. export ENLIGHTEN PATH
  17.  
  18. if test "$SPOOLER" = ucb 
  19. then
  20.         #
  21.         # Interface for Berkeley printer spooler
  22.         #
  23.  
  24.         remlpr -s -h "$HOST" -P$REMPR
  25.         ret=$?
  26.  
  27. fi
  28.  
  29. if test "$SPOOLER" = aix 
  30. then
  31.         #
  32.         # Interface for IBM AIX printer spooler
  33.         #
  34.  
  35.         progname="$0"
  36.         username="$LOGNAME"
  37.         copies=1
  38.         options="$1"
  39.  
  40.         shift; 
  41.  
  42.         for file in $*
  43.         do
  44.             tmp=0
  45.  
  46.             remlp -s  -h "$HOST" -d "$REMPR" -u "$username" -n "$copies" \
  47.                 -o "$options" < $file
  48.  
  49.             tmp=$?
  50.  
  51.             if test "$tmp" -ne 0
  52.             then
  53.                 ret=$tmp
  54.             fi
  55.         done
  56. fi
  57.  
  58. if test "$SPOOLER" = att 
  59. then
  60.         #
  61.         # Interface for AT&T printer spooler
  62.         #
  63.  
  64.         progname="$0"
  65.         requests="$1"
  66.         username="$2"
  67.         title="$3"
  68.         copies="$4"
  69.         options="$5"
  70.  
  71.         shift; shift; shift; shift; shift
  72.  
  73.         for file in $*
  74.         do
  75.             tmp=0
  76.  
  77.             if test -n "$title"
  78.             then
  79.                 remlp -s  -h "$HOST" -d "$REMPR" -u "$username" -n "$copies" \
  80.                     -o "$options" -t "$title" < $file
  81.             else
  82.                 remlp -s  -h "$HOST" -d "$REMPR" -u "$username" -n "$copies" \
  83.                     -o "$options" < $file
  84.             fi
  85.  
  86.             tmp=$?
  87.  
  88.             if test "$tmp" -ne 0
  89.             then
  90.                 ret=$tmp
  91.             fi
  92.         done
  93. fi
  94.  
  95. exit $ret
  96.